home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of Shareware
/
Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso
/
mac
/
DOS
/
PROGRAMG
/
FORTHCMP
/
IAGEBNCH.4TH
< prev
next >
Wrap
Text File
|
1992-03-30
|
738b
|
32 lines
\ This is the Interface Age benchmark program described in
\ Appendix D of the ForthCMP Manual.
( INTERFACE AGE BENCHMARK PROGRAM 08:01 11/16/85 )
500 100 MSDOSEXE
1 0 IN/OUT
: BENCH DUP 2/ 1+ SWAP CR
1 DO DUP I 1 ROT
2 DO DROP DUP 0 I UM/MOD ( more efficient! )
DUP 0= IF DROP DROP 1 LEAVE THEN
1 = IF DROP 1
ELSE DUP 0= IF DROP 0 LEAVE THEN
0< NOT IF 1 THEN
THEN
LOOP IF . ELSE DROP THEN LOOP DROP CR ;
: MAIN 1000 BENCH ;
1 0 IN/OUT
: I. 0 10 UM/MOD ?DUP IF I. THEN ASCII 0 + EMIT ;
: . ?DUP IF I. ELSE ASCII 0 EMIT THEN BL EMIT ;
INCLUDE FORTHLIB
END